package com.zcy.util;

import java.util.concurrent.TimeUnit;

public class TimeUtils {

    public static void sleep(TimeUnit unit, Long value) {
        try {
            unit.sleep(value);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
    }

    /**
     * 会发生用户态与内核态的切换  尽量少调用
     * @return
     */
    public static Long getCurrentTime() {
        return System.currentTimeMillis();
    }

}
